import request from '@/utils/request'

// 获取列表
export function getList (params) {
	return request({
		url: '/Observations',
		method: 'get',
		params
	})
}

/** 获取历史检查列表 */
export function getRelated (data) {
	return request({
		method: 'get',
		url: `Observations/${data.id}/related`
	})
}

/** 获取检查详情 */
export function getRelatedDetail (data) {
	return request({
		method: 'get',
		url: `Observations/${data.id}/exam-detail`
		// url: 'Observations/1268809808652275712/exam-detail'
	})
}

/** 获取检验详情 */
export function Observations_id_inspection_detail (data) {
	return request({
		method: 'get',
		url: `Observations/${data.id}/inspection-detail`
	})
}

/** 获取影像对比地址 */
export function Observations_image_compare (data) {
	return request({
		method: 'get',
		url: 'Observations/image-compare-url',
		data
	})
}

/** 注册患者 */
export function Observations_patient_post (data) {
	return request({
		method: 'post',
		url: 'Observations/patient',
		data
	})
}

/** 查询患者信息 */
export function Observations_patient (data) {
	return request({
		method: 'get',
		url: 'Observations/patient',
		data
	})
}

/** 更新患者信息 */
export function Observations_id_patient (data) {
	return request({
		method: 'put',
		url: `Observations/${data.id}/patient`,
		data
	})
}

/** 注册检查 */
export function Observations_exam_post (data) {
	return request({
		method: 'post',
		url: 'Observations/exam',
		data
	})
}

/** 更新检查信息 */
export function Observations_exam_update (params) {
	return request({
		method: 'put',
		url: `/Observations/${params.id}/exam`
	})
}

/** 注册修订检查结果 */
export function Observations_exam_result (data) {
	return request({
		method: 'post',
		url: '/Observations/exam-result',
		data
	})
}

/** 注册检验 */
export function Observations_inspection (data) {
	return request({
		method: 'post',
		url: 'Observations/inspection',
		data
	})
}

/** 获取检验 */
export function get_Observations_inspection (data) {
	return request({
		method: 'get',
		url: 'Observations/inspection',
		data
	})
}

/** 信息修改 */
export function updatePatient (data) {
	return request({
		method: 'patch',
		url: '/Patients/compelete-infomation',
		data
	})
}
